<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  

  
  <title>VBA 过程(Sub) 入门教程和实例 | 一起学Excel</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="学习完 Excel VBA 基础、VBA 变量以及程序结构，在本章《VBA 过程和函数》，将学习 VBA 中的另一个基础又核心的概念，过程(Sub)。 在今天的这篇文章，先学习 VBA 过程的基础，包括如何写、传入参数、执行和调用过程等。 写在前面VBA 中，过程是一切的开始，几乎所有的代码，都会被写在一个或多个过程里。 实际开发中，通常一个过程，建议只完成一个特定的小目标。因此，我们的程序往往会">
<meta property="og:type" content="article">
<meta property="og:title" content="VBA 过程(Sub) 入门教程和实例">
<meta property="og:url" content="https://lecoder.gitee.io/study-excel/vba-subroutine-basics/index.html">
<meta property="og:site_name" content="一起学Excel">
<meta property="og:description" content="学习完 Excel VBA 基础、VBA 变量以及程序结构，在本章《VBA 过程和函数》，将学习 VBA 中的另一个基础又核心的概念，过程(Sub)。 在今天的这篇文章，先学习 VBA 过程的基础，包括如何写、传入参数、执行和调用过程等。 写在前面VBA 中，过程是一切的开始，几乎所有的代码，都会被写在一个或多个过程里。 实际开发中，通常一个过程，建议只完成一个特定的小目标。因此，我们的程序往往会">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2022-11-23T08:00:48.463Z">
<meta property="article:modified_time" content="2022-11-23T08:14:32.251Z">
<meta property="article:author" content="lijile">
<meta name="twitter:card" content="summary">
  
  
    <link rel="icon" href="/favicon.png">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  
<link rel="stylesheet" href="/study-excel/css/style.css">

<meta name="generator" content="Hexo 6.3.0"></head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/study-excel/" id="logo">一起学Excel</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/study-excel/">Home</a>
        
          <a class="main-nav-link" href="/study-excel/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
        <a id="nav-search-btn" class="nav-icon" title="搜索"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="https://lecoder.gitee.io/study-excel"></form>
      </div>
    </div>
  </div>
</header>
      <div class="outer">
        <section id="main"><article id="post-vba-subroutine-basics" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/study-excel/vba-subroutine-basics/" class="article-date">
  <time datetime="2022-11-23T08:00:48.463Z" itemprop="datePublished">2022-11-23</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/study-excel/categories/VBA/">VBA</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      VBA 过程(Sub) 入门教程和实例
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>学习完 <a href="/study-excel/vba/basic-excel-vba/">Excel VBA 基础</a>、<a href="/study-excel/vba/vba-variable-operators/">VBA 变量</a>以及<a href="/study-excel/vba/vba-program-structure/">程序结构</a>，在本章《VBA 过程和函数》，将学习 VBA 中的另一个基础又核心的概念，过程(Sub)。</p>
<p>在今天的这篇文章，先学习 VBA 过程的基础，包括如何写、传入参数、执行和调用过程等。</p>
<h2 id="写在前面"><a href="#写在前面" class="headerlink" title="写在前面"></a>写在前面</h2><p>VBA 中，过程是一切的开始，几乎所有的代码，都会被写在一个或多个过程里。</p>
<p>实际开发中，通常一个过程，建议只完成一个特定的小目标。因此，我们的程序往往会包含多个过程。这就是 VBA 中过程概念存在的一个原因。</p>
<p>程序中使用过程，可以使程序更简洁、清晰，开发中大型项目更易于管理代码。</p>
<h2 id="过程基础语法"><a href="#过程基础语法" class="headerlink" title="过程基础语法"></a>过程基础语法</h2><p>VBA 过程以 <code>Sub</code> 语句开始，以 <code>End Sub</code> 语句结束，包含一个或多个语句，完成一个特定的目标。</p>
<h3 id="无参数过程"><a href="#无参数过程" class="headerlink" title="无参数过程"></a>无参数过程</h3><p>无参数的 VBA 过程的基本语法如下：</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">Sub [过程名]()</span><br><span class="line">    语句1</span><br><span class="line">    语句2</span><br><span class="line">    ...</span><br><span class="line">    语句n</span><br><span class="line">End Sub</span><br></pre></td></tr></table></figure>

<p>可以看到，过程以 <code>Sub</code> 语句开始，以 <code>End Sub</code> 语句结束，并且具备一个名称，名称后有括号 <code>()</code>。</p>
<p>我们看一个简单的例子。</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">Sub SayHello()</span><br><span class="line">    Msgbox &quot;Hello World&quot;</span><br><span class="line">End Sub</span><br></pre></td></tr></table></figure>

<p>上述就是一个简单的过程，过程名是 <code>SayHello</code>。这个过程只包含一个语句，运行时，弹出对话框显示 <code>Hello World</code>。</p>
<h3 id="有参数过程"><a href="#有参数过程" class="headerlink" title="有参数过程"></a>有参数过程</h3><p>过程还可以接受一个或多个参数，参数可以是常量、变量、表达式，并且每个参数指定其名称。在过程的语句中，接受的参数，以名称指定方式被使用。</p>
<p>接受参数的过程基本语法如下：</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">Sub [过程名]([变量名1] As [数据类型1],...[变量名n] As [数据类型n])</span><br><span class="line">    语句1</span><br><span class="line">    语句2</span><br><span class="line">    ...</span><br><span class="line">    语句n</span><br><span class="line">End Sub</span><br></pre></td></tr></table></figure>

<p>与无参数过程相比，有参数过程在过程名后的括号 <code>()</code> 中，包含一个或多个参数。参数的写法与声明变量语句类似，不同点是在这里不用写 <code>Dim</code>。</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">[变量名1] As [数据类型1]</span><br></pre></td></tr></table></figure>

<p>我们看一个例子。</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">&#x27;声明一个过程</span><br><span class="line">Sub SayHello(name As String)</span><br><span class="line">    Msgbox &quot;Hello&quot; &amp; name</span><br><span class="line">End Sub</span><br><span class="line"></span><br><span class="line">&#x27;在另一个过程，调用上述过程，调用时，提供一个实际的 name 参数</span><br><span class="line">Sub MyCode()</span><br><span class="line">    SayHello &quot;World 2&quot;</span><br><span class="line">End Sub</span><br></pre></td></tr></table></figure>

<p>我们在运行 <code>MyCode</code> 过程时，提供了 <code>name</code> 变量，即 <code>World 2</code> ，运行时弹出对话框显示 <code>Hello World 2</code>。</p>
<h2 id="调用子过程（Sub）"><a href="#调用子过程（Sub）" class="headerlink" title="调用子过程（Sub）"></a>调用子过程（Sub）</h2><p>在程序开发中，把代码拆分成多个子过程和函数，可以使项目更容易管理、测试和运行，VBA 中也不例外。</p>
<p>实际开发中，项目通常具备一个主入口过程，或称为父过程。父过程通过调用多个子过程和函数，完成一系列复杂的操作。其中子过程和函数一般只负责一个操作或动作。</p>
<p>下面看一个简单的例子。</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line">&#x27;主入口</span><br><span class="line">Sub Main()</span><br><span class="line">    Dim name As String</span><br><span class="line">    Dim title As String</span><br><span class="line">    </span><br><span class="line">    name = &quot;Zhang san&quot;</span><br><span class="line">    title = &quot;CEO&quot;</span><br><span class="line">    </span><br><span class="line">    WriteInfo name &amp; &quot;,&quot; &amp; title</span><br><span class="line">End Sub</span><br><span class="line"></span><br><span class="line">&#x27;子过程，在工作表A1单元格填写信息</span><br><span class="line">Sub WriteInfo(info As String)</span><br><span class="line">    Range(&quot;A1&quot;) = info</span><br><span class="line">End Sub</span><br></pre></td></tr></table></figure>

<p>以上的例子中，<code>Main</code> 过程是一个主入口（父过程），程序从此处开始执行，先是给 <code>name</code> 和 <code>title</code> 变量赋值，最后调用 <code>WriteInfo</code> 子过程，将两个信息合并后写到工作表上的 A1 单元格。</p>
<p>接下来介绍调用子过程和函数的基本语法。</p>
<p>调用子过程有两种方法，<strong>直接调用</strong>和<strong>使用 Call 关键词调用</strong>。两种方法对子过程的参数有不同的要求。</p>
<h3 id="直接调用"><a href="#直接调用" class="headerlink" title="直接调用"></a>直接调用</h3><p>直接调用，直接写过程名，即可调用过程。</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">Sub Main()</span><br><span class="line">    MySub</span><br><span class="line">End Sub</span><br><span class="line"></span><br><span class="line">Sub MySub()</span><br><span class="line">    &#x27;代码</span><br><span class="line">End Sub</span><br></pre></td></tr></table></figure>

<p>如果子过程需要输入参数，多个参数只需用逗号（,）分开即可。</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">Sub Main()</span><br><span class="line">    MySub 2019,&quot;年&quot;</span><br><span class="line">End Sub</span><br><span class="line"></span><br><span class="line">Sub MySub(val1 As Integer, val2 As String)</span><br><span class="line">    &#x27;代码</span><br><span class="line">End Sub</span><br></pre></td></tr></table></figure>

<p> </p>
<h3 id="使用关键词-Call-调用"><a href="#使用关键词-Call-调用" class="headerlink" title="使用关键词 Call 调用"></a>使用关键词 Call 调用</h3><p>使用 Call 关键词调用时，Call 后接过程名。</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">Sub Main()</span><br><span class="line">    Call MySub</span><br><span class="line">End Sub</span><br><span class="line"></span><br><span class="line">Sub MySub()</span><br><span class="line">    &#x27;代码</span><br><span class="line">End Sub</span><br></pre></td></tr></table></figure>

<p>如果子过程需要输入参数，则<strong>需要将参数放在括号内</strong>。</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">Sub Main()</span><br><span class="line">    Call MySub(2019,&quot;年&quot;)</span><br><span class="line">End Sub</span><br><span class="line"></span><br><span class="line">Sub MySub(val1 As Integer, val2 As String)</span><br><span class="line">    &#x27;代码</span><br><span class="line">End Sub</span><br></pre></td></tr></table></figure>


<blockquote>
<p>注：程序角度看，调用过程时，不需要使用 Call 关键字，因此不建议此种方法。</p>
</blockquote>
<h2 id="提前退出过程"><a href="#提前退出过程" class="headerlink" title="提前退出过程"></a>提前退出过程</h2><p>正常情况下，VBA 过程以 <code>Sub</code> 语句开始，以 <code>End Sub</code> 语句结束。但有时根据实际情况，可能需要提前结束并退出过程。VBA 提供 2 种提前退出过程的方法，<code>Exit Sub</code> 和 <code>End</code> 方法。</p>
<h3 id="Exit-Sub-语句"><a href="#Exit-Sub-语句" class="headerlink" title="Exit Sub 语句"></a>Exit Sub 语句</h3><p>在一个过程中，当程序运行到 <code>Exit Sub</code> 语句时，立即结束<strong>当前过程</strong>，提前退出。</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">Sub Main()</span><br><span class="line">    Call MySub</span><br><span class="line">    Msgbox &quot;父过程&quot;</span><br><span class="line">End Sub</span><br><span class="line"></span><br><span class="line">Sub MySub()</span><br><span class="line">    Exit Sub</span><br><span class="line">    Msgbox &quot;子过程&quot;</span><br><span class="line">End Sub</span><br><span class="line"></span><br><span class="line">&#x27;运行 Main 过程，返回结果：</span><br><span class="line">=&gt; &quot;父过程&quot;</span><br></pre></td></tr></table></figure>

<p>在以上例子中，<code>Main</code> 过程调用 <code>MySub</code> 子过程，遇到 <code>Exit Sub</code> 语句，立即退出子过程，回到父过程 <code>Main</code> ，继续运行余下的语句。</p>
<p><strong>这里需要注意的是，<code>Exit Sub</code> 语句只作用于当前过程，不影响调用它的父过程。</strong></p>
<h3 id="End-语句"><a href="#End-语句" class="headerlink" title="End 语句"></a>End 语句</h3><p>在一个过程，当程序运行到 <code>End</code> 语句时，立即<strong>结束当前运行的所有 VBA 过程</strong>。</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">Sub Main()</span><br><span class="line">    Call MySub</span><br><span class="line">    Msgbox &quot;父过程&quot;</span><br><span class="line">End Sub</span><br><span class="line"></span><br><span class="line">Sub MySub()</span><br><span class="line">	End</span><br><span class="line">    Msgbox &quot;子过程&quot;</span><br><span class="line">End Sub</span><br><span class="line"></span><br><span class="line">&#x27;运行 Main 过程，返回结果：</span><br><span class="line">=&gt; 无返回结果</span><br></pre></td></tr></table></figure>

<p>在以上例子中，<code>Main</code> 过程调用 <code>MySub</code> 子过程，遇到 <code>End</code> 语句时，立即结束当前运行的所有过程，包括父过程 <code>Main</code>。</p>
<p>在实际开发中，应谨慎使用 <code>End</code> 结束语句。<code>End</code> 语句的效果类似于电脑的强制关机命令，立即结束所有程序，不会保存任何值，于 VBA 有以下效果：</p>
<ul>
<li>程序中对象的各类事件不会被触发；</li>
<li>任何在运行的 VBA 程序都会停止；</li>
<li>对象引用都会失效；</li>
<li>任何打开的窗体都被关闭。</li>
</ul>
<h2 id="总结"><a href="#总结" class="headerlink" title="总结"></a>总结</h2><p>过程是 VBA 的一个核心概念，几乎所有的代码会写在一个或多个过程里。过程可以接受 0 个或多个参数，参数可以在过程或函数里使用。在过程中可以调用其他子过程，把复杂的代码分成若干个过程，使代码易于管理和编写。最后过程可以提前结束，做到不需要运行所有的语句就退出过程。</p>
<p> </p>

      
    </div>
    <footer class="article-footer">
      <a data-url="https://lecoder.gitee.io/study-excel/vba-subroutine-basics/" data-id="clatcwb8d004sxcq6abfk2rmu" class="article-share-link">Share</a>
      
      
    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/study-excel/vba-comment/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          VBA 注释教程和实例
        
      </div>
    </a>
  
  
    <a href="/study-excel/vba-function-basics/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">VBA 函数(Function)入门教程和实例</div>
    </a>
  
</nav>

  
</article>

</section>
        
          <aside id="sidebar">
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">分类</h3>
    <div class="widget">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/VBA/">VBA</a></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%85%AC%E5%BC%8F/">公式</a></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%87%BD%E6%95%B0/">函数</a></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%87%BD%E6%95%B0%E4%B8%8E%E5%85%AC%E5%BC%8F%E5%9F%BA%E7%A1%80/">函数与公式基础</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%87%BD%E6%95%B0%E4%B8%8E%E5%85%AC%E5%BC%8F%E5%9F%BA%E7%A1%80/%E5%9F%BA%E7%A1%80/">基础</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%87%BD%E6%95%B0%E4%B8%8E%E5%85%AC%E5%BC%8F%E5%9F%BA%E7%A1%80/%E5%9F%BA%E7%A1%80/%E5%85%AC%E5%BC%8F%E5%9F%BA%E7%A1%80/">公式基础</a></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%87%BD%E6%95%B0%E4%B8%8E%E5%85%AC%E5%BC%8F%E5%9F%BA%E7%A1%80/%E5%9F%BA%E7%A1%80/%E5%85%AC%E5%BC%8F%E9%94%99%E8%AF%AF/">公式错误</a></li></ul></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%8A%9F%E8%83%BD/">功能</a></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%8A%9F%E8%83%BD%E5%8C%BA/">功能区</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%8A%9F%E8%83%BD%E5%8C%BA/%E5%9F%BA%E7%A1%80/">基础</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%8A%9F%E8%83%BD%E5%8C%BA/%E5%9F%BA%E7%A1%80/%E5%85%AC%E5%BC%8F/">公式</a></li></ul></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%8D%95%E5%85%83%E6%A0%BC%E5%BC%95%E7%94%A8/">单元格引用</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%8D%95%E5%85%83%E6%A0%BC%E5%BC%95%E7%94%A8/%E5%9F%BA%E7%A1%80/">基础</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%8D%95%E5%85%83%E6%A0%BC%E5%BC%95%E7%94%A8/%E5%9F%BA%E7%A1%80/%E5%87%BD%E6%95%B0%E4%B8%8E%E5%85%AC%E5%BC%8F%E5%9F%BA%E7%A1%80/">函数与公式基础</a></li></ul></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E6%9C%AC%E6%A6%82%E5%BF%B5/">基本概念</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E6%9C%AC%E6%A6%82%E5%BF%B5/%E5%9F%BA%E7%A1%80/">基础</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E6%9C%AC%E6%A6%82%E5%BF%B5/%E5%9F%BA%E7%A1%80/%E4%BD%BF%E7%94%A8-Excel/">使用 Excel</a></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E6%9C%AC%E6%A6%82%E5%BF%B5/%E5%9F%BA%E7%A1%80/%E5%87%BD%E6%95%B0%E4%B8%8E%E5%85%AC%E5%BC%8F/">函数与公式</a></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E6%9C%AC%E6%A6%82%E5%BF%B5/%E5%9F%BA%E7%A1%80/%E5%8D%95%E5%85%83%E6%A0%BC/">单元格</a></li></ul></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E6%9C%AC%E8%AE%BE%E7%BD%AE/">基本设置</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E6%9C%AC%E8%AE%BE%E7%BD%AE/%E5%9F%BA%E7%A1%80/">基础</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E6%9C%AC%E8%AE%BE%E7%BD%AE/%E5%9F%BA%E7%A1%80/%E4%BF%9D%E5%AD%98%E8%AE%BE%E7%BD%AE/">保存设置</a></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E6%9C%AC%E8%AE%BE%E7%BD%AE/%E5%9F%BA%E7%A1%80/%E5%85%AC%E5%BC%8F%E8%AE%BE%E7%BD%AE/">公式设置</a></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E6%9C%AC%E8%AE%BE%E7%BD%AE/%E5%9F%BA%E7%A1%80/%E5%85%B6%E4%BB%96%E8%AE%BE%E7%BD%AE/">其他设置</a></li></ul></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/">基础</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/">基础操作</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E4%BF%9D%E6%8A%A4/">保护</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E5%A4%8D%E5%88%B6%E5%85%AC%E5%BC%8F/">复制公式</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E5%A4%8D%E5%88%B6%E5%85%AC%E5%BC%8F/%E5%87%BD%E6%95%B0%E4%B8%8E%E5%85%AC%E5%BC%8F%E5%9F%BA%E7%A1%80/">函数与公式基础</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E5%AE%A1%E9%98%85/">审阅</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E5%AE%A1%E9%98%85/%E5%8A%9F%E8%83%BD%E5%8C%BA/">功能区</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E5%B7%A5%E4%BD%9C%E7%95%8C%E9%9D%A2/">工作界面</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E5%B7%A5%E4%BD%9C%E7%95%8C%E9%9D%A2/%E5%9F%BA%E6%9C%AC%E6%A6%82%E5%BF%B5/">基本概念</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E5%B8%B8%E8%A7%81%E6%9C%AF%E8%AF%AD/">常见术语</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E5%B8%B8%E8%A7%81%E6%9C%AF%E8%AF%AD/%E5%9F%BA%E6%9C%AC%E6%A6%82%E5%BF%B5/">基本概念</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E5%B8%B8%E8%A7%84%E8%AE%BE%E7%BD%AE/">常规设置</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E5%B8%B8%E8%A7%84%E8%AE%BE%E7%BD%AE/%E5%9F%BA%E6%9C%AC%E8%AE%BE%E7%BD%AE/">基本设置</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E5%BC%80%E5%A7%8B/">开始</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E5%BC%80%E5%A7%8B/%E5%8A%9F%E8%83%BD%E5%8C%BA/">功能区</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E6%8F%92%E5%85%A5/">插入</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E6%8F%92%E5%85%A5/%E5%8A%9F%E8%83%BD%E5%8C%BA/">功能区</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E6%95%B0%E6%8D%AE/">数据</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E6%95%B0%E6%8D%AE/%E5%8A%9F%E8%83%BD%E5%8C%BA/">功能区</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E6%96%B0%E5%A2%9E%E5%8A%9F%E8%83%BD%E5%92%8C%E5%87%BD%E6%95%B0/">新增功能和函数</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E6%96%B0%E5%A2%9E%E5%8A%9F%E8%83%BD%E5%92%8C%E5%87%BD%E6%95%B0/Excel-2007/">Excel 2007</a></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E6%96%B0%E5%A2%9E%E5%8A%9F%E8%83%BD%E5%92%8C%E5%87%BD%E6%95%B0/Excel-2010/">Excel 2010</a></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E6%96%B0%E5%A2%9E%E5%8A%9F%E8%83%BD%E5%92%8C%E5%87%BD%E6%95%B0/Excel-2013/">Excel 2013</a></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E6%96%B0%E5%A2%9E%E5%8A%9F%E8%83%BD%E5%92%8C%E5%87%BD%E6%95%B0/Excel-2016/">Excel 2016</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E6%A0%A1%E5%AF%B9%E8%AE%BE%E7%BD%AE/">校对设置</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E6%A0%A1%E5%AF%B9%E8%AE%BE%E7%BD%AE/%E5%9F%BA%E6%9C%AC%E8%AE%BE%E7%BD%AE/">基本设置</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E7%BC%96%E5%86%99%E5%85%AC%E5%BC%8F/">编写公式</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E7%BC%96%E5%86%99%E5%85%AC%E5%BC%8F/%E5%87%BD%E6%95%B0%E4%B8%8E%E5%85%AC%E5%BC%8F%E5%9F%BA%E7%A1%80/">函数与公式基础</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E7%BC%96%E8%BE%91%E5%85%AC%E5%BC%8F/">编辑公式</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E7%BC%96%E8%BE%91%E5%85%AC%E5%BC%8F/%E5%87%BD%E6%95%B0%E4%B8%8E%E5%85%AC%E5%BC%8F%E5%9F%BA%E7%A1%80/">函数与公式基础</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E8%A7%86%E5%9B%BE/">视图</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E8%A7%86%E5%9B%BE/%E5%8A%9F%E8%83%BD%E5%8C%BA/">功能区</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E9%A1%B5%E9%9D%A2%E5%B8%83%E5%B1%80/">页面布局</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E9%A1%B5%E9%9D%A2%E5%B8%83%E5%B1%80/%E5%8A%9F%E8%83%BD%E5%8C%BA/">功能区</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E9%AB%98%E7%BA%A7%E8%AE%BE%E7%BD%AE/">高级设置</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E9%AB%98%E7%BA%A7%E8%AE%BE%E7%BD%AE/%E5%9F%BA%E6%9C%AC%E8%AE%BE%E7%BD%AE/">基本设置</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E9%BC%A0%E6%A0%87%E6%8C%87%E9%92%88/">鼠标指针</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E9%BC%A0%E6%A0%87%E6%8C%87%E9%92%88/%E5%9F%BA%E6%9C%AC%E6%A6%82%E5%BF%B5/">基本概念</a></li></ul></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/">基础操作</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E5%A4%8D%E5%88%B6%E4%B8%8E%E7%B2%98%E8%B4%B4/">复制与粘贴</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E5%A4%8D%E5%88%B6%E4%B8%8E%E7%B2%98%E8%B4%B4/%E5%9F%BA%E7%A1%80/">基础</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E6%89%93%E5%8D%B0/">打印</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E6%89%93%E5%8D%B0/%E5%9F%BA%E7%A1%80/">基础</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E6%9F%A5%E6%89%BE%E4%B8%8E%E9%80%89%E6%8B%A9/">查找与选择</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E6%9F%A5%E6%89%BE%E4%B8%8E%E9%80%89%E6%8B%A9/%E5%9F%BA%E7%A1%80/">基础</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E7%BC%96%E8%BE%91%E5%8D%95%E5%85%83%E6%A0%BC%E6%A0%BC%E5%BC%8F/">编辑单元格格式</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E7%BC%96%E8%BE%91%E5%8D%95%E5%85%83%E6%A0%BC%E6%A0%BC%E5%BC%8F/%E5%9F%BA%E7%A1%80/">基础</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E7%BC%96%E8%BE%91%E5%B7%A5%E4%BD%9C%E8%A1%A8/">编辑工作表</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E7%BC%96%E8%BE%91%E5%B7%A5%E4%BD%9C%E8%A1%A8/%E5%9F%BA%E7%A1%80/">基础</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E7%BC%96%E8%BE%91%E5%B7%A5%E4%BD%9C%E8%A1%A8%E5%8C%BA%E5%9F%9F/">编辑工作表区域</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E7%BC%96%E8%BE%91%E5%B7%A5%E4%BD%9C%E8%A1%A8%E5%8C%BA%E5%9F%9F/%E5%9F%BA%E7%A1%80/">基础</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E7%BC%96%E8%BE%91%E6%95%B0%E5%AD%97%E6%A0%BC%E5%BC%8F/">编辑数字格式</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E7%BC%96%E8%BE%91%E6%95%B0%E5%AD%97%E6%A0%BC%E5%BC%8F/%E5%9F%BA%E7%A1%80/">基础</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E9%BC%A0%E6%A0%87%E6%93%8D%E4%BD%9C/">鼠标操作</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E9%BC%A0%E6%A0%87%E6%93%8D%E4%BD%9C/%E5%9F%BA%E7%A1%80/">基础</a></li></ul></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%BF%AB%E6%8D%B7%E9%94%AE/">快捷键</a></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E9%97%AE%E9%A2%98/">问题</a></li></ul>
    </div>
  </div>


  
    

  
    
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">归档</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/study-excel/archives/2022/11/">十一月 2022</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">最新文章</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/study-excel/excel-coupdaybs-function/">Excel COUPDAYBS 函数</a>
          </li>
        
          <li>
            <a href="/study-excel/excel-coupdays-function/">Excel COUPDAYS 函数</a>
          </li>
        
          <li>
            <a href="/study-excel/excel-coupdaysnc-function/">Excel COUPDAYSNC 函数</a>
          </li>
        
          <li>
            <a href="/study-excel/excel-coupncd-function/">Excel COUPNCD 函数</a>
          </li>
        
          <li>
            <a href="/study-excel/excel-coupnum-function/">Excel COUPNUM 函数</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2022 lijile<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>
    </div>
    <nav id="mobile-nav">
  
    <a href="/study-excel/" class="mobile-nav-link">Home</a>
  
    <a href="/study-excel/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>


  
<link rel="stylesheet" href="/study-excel/fancybox/jquery.fancybox.css">

  
<script src="/study-excel/fancybox/jquery.fancybox.pack.js"></script>




<script src="/study-excel/js/script.js"></script>




  </div>
</body>
</html>